﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Wormhole.Engine.CardLibrary.CardProperties
{
	/// <author>Rodney McKay</author>
	/// <date>04 April 2008</date>
	/// <summary>
	/// This class is used to store the skills a card may have.
	/// The value for a skill of 0 and NULL is different. A skill
	/// with NULL indacte that the skill will not be displayed on 
	/// the card, while the 0 will be displayed.
	/// </summary>
	public class Skills
	{
		#region Properties

		#region Indexer
		/// <summary>
		/// The indexer of the skills object.
		/// </summary>
		/// <param name="skill">The skill type</param>
		/// <returns>Returns the value of the skill.</returns>
		public int? this[Skill skill]
		{
			get
			{
				switch (skill)
				{
					case Skill.Combat:
						return this.Combat;
					case Skill.Culture:
						return this.Culture;
					case Skill.Ingenuity:
						return this.Ingenuity;
					case Skill.Science:
						return this.Science;
				}

				return null;
			}

			set
			{
				switch (skill)
				{
					case Skill.Combat:
						this.Combat = value;
						break;
					case Skill.Culture:
						this.Culture = value;
						break;
					case Skill.Ingenuity:
						this.Ingenuity = value;
						break;
					case Skill.Science:
						this.Science = value;
						break;
				}
			}
		}
		#endregion

		/// <summary>
		/// The culture skill.
		/// </summary>
		public int? Culture { get; set; }

		/// <summary>
		/// Science skill.
		/// </summary>
		public int? Science { get; set; }

		/// <summary>
		/// The combat skills.
		/// </summary>
		public int? Combat { get; set; }

		/// <summary>
		/// The ingenuity skill.
		/// </summary>
		public int? Ingenuity { get; set; }

		#endregion
	}
}
